package pCloud.crypto.kpabe;

import java.net.InetSocketAddress;

import pCloud.message.Message;

/**
 * @author ttadinh
 * contains the full cipher text (Ep + encrypted attributes), as well as Ep
 */
public class CipherMessage extends Message{
	int streamId;
	byte[] cipher;
	byte[] ep;	
	boolean isSlidingWindow;
	int index;
	
	public CipherMessage(int si, byte[] cp, byte[] ep, boolean isSw, int idx){
		super(null,null,null,Message.TO_CLOUD);
		this.streamId = si;		
		this.cipher = cp;
		this.ep = ep;
		this.isSlidingWindow = isSw;
		this.index = idx;
	}
	
	public int getIndex(){
		return this.index;
	}
	
	public boolean isSlidingWindow(){
		return this.isSlidingWindow;
	}
			
	public int getStreamId() {
		return streamId;
	}


	public byte[] getCipher() {
		return cipher;
	}


	public byte[] getEp() {
		return ep;
	}

}
